from django.conf.urls.defaults import *
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/(.*)', admin.site.root),

    # Serve static media files on localhost
    # On production environment, request should be redirected by RewriteRule in .htaccess, and never goes here
    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.SITE_ROOT+'/onlinelist/media/'}),

    # It seemed we don't need to serve media from admin, APP(admin) will serve itself ?!
    # (r'^admin_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.SITE_ROOT+'/onlinelist/admin_media/'}),

    # Example:
    # (r'^djsite_onlinelist/', include('djsite_onlinelist.foo.urls')),
    (r'', include('djsite_onlinelist.onlinelist.urls')),

)
